package com.own.business.system.dictionary.base.frame.business.service;

import com.own.business.system.dictionary.base.frame.entity.bo.SystemDictionaryBo;
import com.own.business.system.dictionary.base.frame.entity.map.SystemDictionaryMapVo;
import com.own.business.system.dictionary.base.frame.entity.po.SystemDictionary;
import com.own.business.system.dictionary.base.frame.entity.query.SystemDictionaryQuery;
import com.own.business.system.dictionary.base.frame.entity.vo.SystemDictionaryVo;
import com.own.component.common.base.service.BaseService;

import java.util.List;

/**
 * SystemDictionaryService
 *
 * @author chenxueli
 * @date 2023-06-27 15:29:30
 */
public interface SystemDictionaryService extends BaseService<
        SystemDictionary,
        SystemDictionaryBo,
        SystemDictionaryVo,
        SystemDictionaryMapVo,
        SystemDictionaryQuery
        > {

    /**
     * 根据数据字典类型的code查询
     *
     * @param code code值
     * @return 返回列表
     */
    List<SystemDictionaryMapVo> mapByDictionaryCode(String code);

    /**
     * 根据name和rootCode获取id
     *
     * @param name     名称
     * @param rootCode 根code
     * @return id
     */
    Long getIdByNameAndRootCode(String name, String rootCode);

    /**
     * 根据数据字典类型的code查询
     *
     * @param code code值
     * @return 返回列表
     */
    SystemDictionary getByCode(String code);

}

